-
Notifications
You must be signed in to change notification settings - Fork 314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Annotate intersecting roads and maneuver points along the current route #2928
base: main
Are you sure you want to change the base?
Conversation
@chezzdev - Please review my use of the new electronic horizon API. Also, please note that I added the RoadGraph to the set of data sent by the EHorizon notifications since that information is needed in order to lookup road network information for the edges so we can display relevant info. |
2d7b635
to
7acf938
Compare
Exposed the font list for the intersection annotations style layer as a UIAppearance proxy of a list of font name strings. Allows for developer to pick fonts in order to support the geographies and languages that they need. Expanded the default set to include |
Would love to see tests for the new functionality. |
Sources/MapboxNavigation/NavigationMapView+BuildingHighlighting.swift
Outdated
Show resolved
Hide resolved
import MapboxCoreNavigation | ||
|
||
extension ElectronicHorizon.Edge { | ||
var mpp: [ElectronicHorizon.Edge]? { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mpp
isn't readable to me.
This may be blocked by a regression in the map SDK: mapbox/mapbox-maps-ios#381. Need to visually confirm that the tails still point to the route line and that the bubble can stretch horizontally without part of the tail stretching. |
e6175ac
to
1ef5c18
Compare
1ef5c18 has been rebased to squash some intermediate commits. |
let stretchX = [ImageStretches(first: Float(20), second: Float(30)), ImageStretches(first: Float(90), second: Float(100))] | ||
let stretchY = [ImageStretches(first: Float(26), second: Float(32))] | ||
let imageContent = ImageContent(left: 20, top: 26, right: 100, bottom: 33) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that mapbox/mapbox-maps-ios#1269 has landed, we should define cap insets in the asset catalog instead of in code, where they’re more fragile.
{ | ||
"images" : [ | ||
{ | ||
"filename" : "AnnotationCentered.png", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with: "AnnotationCentered", | ||
stretchX: stretchX, | ||
stretchY: stretchY, | ||
scale: 2.0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This scale
parameter went away in mapbox/mapbox-maps-ios#321. It looks like these assets need to be scaled down by a factor of 2.
…tive route as well as at maneuver points.
…rsection annotation labels. Set defaults to include a couple of fallbacks that should catch a larger number of glyphs than before.
1ef5c18
to
c02539f
Compare
The image stretches correctly, but the anchors are way off: |
Description
Adds a UI feature to add visible callout annotations for upcoming intersecting roads, and for annotating the next maneuver point.
Implemented using the Nav SDK v2.0 Electronic Horizon feature.
Screenshots or Gifs